package main

import (
	"fmt"
	"strconv"
)

func main() {
	t2()
}

func t2() {
	mapTest := make(map[string]interface{}, 0)
	mapTest["1"] = "我是1"
	mapTest["2"] = "我是2"
	mapTest["3"] = "我是3"
	mapTest["8"] = "我是8"
	for i := 0; i < 10; i++ {
		if v, ok := mapTest[strconv.Itoa(i)]; ok {
			fmt.Println(v)
		}
	}
}

func t1() {
	t := &test{make(map[string][]interface{})}
	t.Add("1", "1q", "1e")
	t.Add("2", "2q", "2e")
	t.Exec()
}

type test struct {
	collection map[string][]interface{}
}

func (t *test) Add(sqlStr string, args ...interface{}) {
	t.collection[sqlStr] = args
}

func (t *test) Exec() {
	for _, v := range t.collection {
		fmt.Println(v...)
	}
}
